import Vue from 'vue'
import VueRouter from 'vue-router'
import MyNotepad from '@/pages/MyNotepad.vue'

Vue.use(VueRouter);
const router = new VueRouter({
    mode: 'history', //
    routes: [{
            path: '/',
            redirect: '/MyNotepad' // 重定向路由到指定路由，
        },
        {
            path: '/MyNotepad',
            name: 'MyNotepad',
            component: MyNotepad,
            meta: {
                // requireAuth: true, //  当前路由是否需要登录才可进入
                title: '小黑记事本'
            }
        },
        {
            path: '/AchievementCase',
            name: 'AchievementCase',
            // redirect:'/MyNotepad',// 重定向路由到指定路由，
            component: () => import("@/pages/AchievementCase"),
            meta: {
                // requireAuth: true, //  当前路由是否需要登录才可进入
                title: '成绩案例'
            }
        }, {
            path: '/shoopingCart',
            name: 'shoopingCart',
            component: () => import("@/pages/shoopingCart"),
            meta: {
                // requireAuth: true, //  当前路由是否需要登录才可进入
                title: '购物车'
            }
        }, {
            path: '/AccountList',
            name: 'AccountList',
            component: () => import("@/pages/AccountList"),
            meta: {
                // requireAuth: true, //  当前路由是否需要登录才可进入
                title: '记账清单'
            }
        }, {
            path: '/MyTable',
            name: 'MyTable',
            component: () => import("@/pages/MyTable"),
            meta: {
                // requireAuth: true, //  当前路由是否需要登录才可进入
                title: '封装表格'
            }
        }, {
            path: '/MoreauIndex',
            name: 'MoreauIndex',
            component: () => import("@/pages/MoreauIndex"),
            meta: {
                // requireAuth: true, //  当前路由是否需要登录才可进入
                title: '面经'
            },
            children: [{
                path: '/MoreauApp',
                name: 'MoreauApp',
                component: () => import("@/pages/ChildPages/MoreauApp"),
            },{
                path: '/CollectPage',
                name: 'CollectPage',
                component: () => import("@/pages/ChildPages/CollectPage"),
            }]
        }, {
            path: '/MoreauParticulars/:can', //无匹配到前面所有路由规则才匹配该路由
            name: 'MoreauParticulars',
            component: () => import("@/pages/MoreauParticulars"),
            meta: {
                title: 'MoreauParticulars'
            }
        },{
            path: '/VuexCartIndex', //无匹配到前面所有路由规则才匹配该路由
            name: 'VuexCartIndex',
            component: () => import("@/pages/MobileTerminal/VuexCartIndex"),
            meta: {
                title: 'vuex购物车'
            }
        },{
            path: '*', //无匹配到前面所有路由规则才匹配该路由
            name: 'NotFound',
            component: () => import("@/pages/NotFound"),
            meta: {
                title: 'NotFound'
            }
        },
    ]
})
export default router